import { createSlice } from "@reduxjs/toolkit";

const initialState = {
  start: "北京",
  end: "广州",
  date: "2023-10-13",
  isSpeed: true,
  isSeat: true,
  isDesc: true,
};

const counterSlice = createSlice({
  name: "counterSlice",
  initialState,
  reducers: {
    list(state, { payload }) {
      state[payload.type] = payload.val;
    },
  },
});

export const { list } = counterSlice.actions;
export default counterSlice.reducer;
